package com.glenet.salary.action;

import java.util.List;

import com.glenet.salary.dao.HrTemplateDao;
import com.glenet.salary.entities.HrTemplate;

/**
 * @author MeiWenhui
 * 
 */
@SuppressWarnings("serial")
public class HrTemplateAction extends BaseAction {

	private HrTemplate template;
	private Long id;

	private HrTemplateDao templateDao = new HrTemplateDao();

	public String getTemplates() {
		List<HrTemplate> tpls = templateDao.getTemplates();
		System.out.println(tpls.size());
		req.setAttribute("tpls", tpls);
		return SUCCESS;
	}

	public String get() {
		template = templateDao.getTemplate(id);
		return SUCCESS;

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setTemplate(HrTemplate template) {
		this.template = template;
	}

	public HrTemplate getTemplate() {
		return template;
	}

}
